import request from '@/utils/request'

/**
 *
 * 获取组织架构数据
 *
*/
export function getDepartment() {
  return request({
    url: '/company/department'
  })
}
/**
 *
 * 获取部门负责人的数据
 *
*/
export function getmanagerIdAPI(params) {
  return request({
    url: '/sys/user/simple',
    method: 'GET',
    params
  })
}
/**
 *
 * 新增组织
 *
*/
export function createdAPI(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
/**
 *
 * 删除组织
 *
*/
export function delAPI(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
/**
 *
 * 获取部门详情
 *
*/
export function getdatailAPI(id) {
  return request({
    url: `/company/department/${id}`
  })
}
/**
 *
 * 修改部门
 *
*/
export function recomposeAPI(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
